# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Alexander Baldeck <alexander@archlinux.org>

pkgname=libxss
pkgver=1.2.3
pkgrel=1
pkgdesc="X11 Screen Saver extension library"
arch=('x86_64')
license=('custom')
url="https://gitlab.freedesktop.org/xorg/lib/libxscrnsaver"
depends=('libxext' 'scrnsaverproto')
makedepends=('xorg-util-macros')
source=("https://xorg.freedesktop.org/releases/individual/lib/libXScrnSaver-${pkgver}.tar.bz2"
       # "${url}/-/archive/libXScrnSaver-${pkgver}/libxscrnsaver-libXScrnSaver-${pkgver}.tar.bz2"
)
#https://gitlab.freedesktop.org/xorg/lib/libxscrnsaver/-/archive/libXScrnSaver-1.2.3/libxscrnsaver-libXScrnSaver-1.2.3.tar.bz2
sha512sums=('7ea628324a11b25ee82c7b11c6bf98f37de219354de51c1e29467b5de422669ba1ab121f3b9dc674093c8f3960e93c5d5428122f5539092f79bc8451c768354a')

build() {
  cd libXScrnSaver-${pkgver}
  ./configure --prefix=/usr --sysconfdir=/etc
  make
}

package() {
  cd libXScrnSaver-${pkgver}
  make DESTDIR="${pkgdir}" install

  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
}
